-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
icon_color option for entities #3956
Conversation
What format would this config be in? |
We still need to have a good strategy for colouring icons btw |
icon_color:
- 200 // hue
- 100 // sat which I don't particular like |
what do you mean by this? |
No that kinda sucks |
We should have a strategy for giving colors to state icons, like in what state what color. Like we have for lights and switches now, and has been asked for the other domains. |
Something to be tackled with a theming refactoring, I think. Personally I think "on" should just be active color for everything, I didn't really care for the whole "sun" reasoning |
It is not about theming, it is about the discussion in: |
It is partially about theming as if we split sun-active vs regular-active it will be another css var. Like I said, I think on should just be on... |
regardless of the outcome of that discussion, I would still like to introduce |
@iantrich sorry if this is noob question, but will this change allow setting color based on state? For example in template sensor I'd like to have 2 states, so I'd like to be able to specify a icon color template that will return color based on my condition, similar to icon template. Hope this will be possible. |
@Misiu no, it is just a static option |
Hopefully, the dynamic option will come soon after 😉 |
+1 to that! Adding to that, it would be one of the most sought after features to implement in the backend for customize: Have the possibility to set icon_color (and even better, have the option of using a template) for all entities.... |
There is Sorry for all those questions - I'm still new to HA and just starting with Python. |
I'm thinking about this a bit more, but this should be done in themes, like all styling. And we already have a |
How do you theme per entity on an entities card? |
I was still at the |
My concern with going the theme route for active/inactive is that it is not always that clear cut and your themes are going to be a disaster trying to handle edge cases/different views/cards. e.g. a weather alert sensor. Theming that sounds difficult and non-intuitive. That may keep individual our element code a little bit simpler, but it makes configuration of each card/entity much more difficult for a user. And on the topic of per-entity; I do see a need for it and is far from overkill. |
@bramkragten I don't know if this is related, but I've created PR that adds support for |
@Misiu that looks great for power users looking to do some really heavy lifting; but if I just want a single icon to be purple, I should be able to make it purple without grabbing a custom card or setting up a backend template. |
partial for #3897
Wanting to get feedback on supporting
icon_color
howhs_color
was supported or if something else should be pursued.Docs: TODO